package com.sq.partner.manager.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.sq.partner.manager.mybatis.model.FacadePayment;
import com.sq.partner.manager.mybatis.model.GatewayUser;
import com.sq.partner.manager.mybatis.model.OutboundCardApply;
import com.sq.partner.manager.util.Page;

/**
 * 卡单出库申请Dao
 * 
 * SQ
 *
 */
public interface OutboundCardApplyDao extends BaseDao {

    /**
     * 根据条件分页查询多条申请信息
     * 
     * @param applyinfo
     * @return
     * @throws Exception
     */
    public Page<OutboundCardApply> queryOutboundList(
            Page<OutboundCardApply> page) throws Exception;

    public Page<OutboundCardApply> queryCardInfoByCommamtId(
            Page<OutboundCardApply> page) throws Exception;

    /**
     * 根据条件分页查询选择出库的多条卡单信息
     * 
     * @param applyinfo
     * @return
     * @throws Exception
     */
    public Page<OutboundCardApply> queryOutboundAppliedList(
            Page<OutboundCardApply> page) throws Exception;

    // /**
    // * 查找方案号
    // * @param name
    // * @return
    // * @throws Exception
    // */
    // public String queryPlanNo(String name) throws Exception;

    // public boolean updatePlanNo(String name,String planNo) throws Exception;

    public boolean updateStatusAndCommamtId(HashMap<String, Object> paramMap)
            throws Exception;

    public Integer queryCountMax(HashMap<String, Object> paramMap)
            throws Exception;

    public boolean updateStatusByCommamtId(HashMap<String, Object> paramMap)
            throws Exception;

    public boolean updateCancelStatusByCommamtId(
            HashMap<String, Object> paramMap) throws Exception;

    public List<String> getCardNoList(String commamtId) throws Exception;

    public List<OutboundCardApply> queryUpdateList(
            HashMap<String, Object> paramMap) throws Exception;
    /**
     * 生成支付流水号
     * @param stagNo
     * @return
     * @throws Exception
     */
    public String findFacadePaymentBystagNo(String stagNo) throws Exception;
    /**
     * 保存支付信息
     * @param payment
     * @throws Exception
     */
    public void saveFacadePayment(FacadePayment payment) throws Exception;
    /**
     * 查询支付信息
     * @param payid
     * @return
     * @throws Exception
     */
    public FacadePayment getFacadePaymentByTransNo(String transNo) throws Exception;
    /**
     * 修改支付信息
     * @param payment
     * @return
     * @throws Exception
     */
    public boolean updateFacadePayment(FacadePayment payment) throws Exception;
    /**
     * 按照条件查询payment
     * @param map
     * @return
     * @throws Exception
     */
    public FacadePayment queryPayment(HashMap<String,String> map) throws Exception;
    
    /**
     * 根据出库ID查找出库人数字工号
     * @param commamtId
     * @return
     * @throws Exception
     */
    public Map<String, String> getEmployeeNoByCommamtId(String commamtId) throws Exception;
}
